'use strict';
// Copyright 2014 Blueant Inc. All Rights Reserved.

/**
 * @fileoverview 生产的士兵
 * @author sundbcn@gmail.com (sun debing)
 */

var moment = require('moment');
var mongoose = require('mongoose');

///////////////////////////////////////////////////////////
/**
 * 生产的士兵
 * @type {mongoose}
 */
var soldierProductSchema = new mongoose.Schema({
    // 兵种类型
    soldier_type: {
        type: Number
    },

    // 生产的个数
    num: {
        type: Number
    }
});

/**
 * 获取士兵类型
 * @return {[type]} [description]
 */
soldierProductSchema.methods.getSoldierType = function () {
    return this.soldier_type;
};

/**
 * 获取建造的个数
 * @return {[type]} [description]
 */
soldierProductSchema.methods.getNum = function () {
    return this.num;
};

if (!soldierProductSchema.options.toJSON) {
    soldierProductSchema.options.toJSON = {};
}
/* jshint unused:false */
soldierProductSchema.options.toJSON.transform = function (doc, ret) {
    delete ret.__v;
};

module.exports = soldierProductSchema;
